home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The CICA Windows Explosion!
/
The CICA Windows Explosion! - Disc 2.iso
/
demo
/
medmfc.zip
/
MULTIPAD.CPP
< prev
next >
Wrap
C/C++ Source or Header
|
1994-06-27
|
2KB
|
59 lines
// multipad.cpp : Defines the class behaviors for the Multipad application.
//
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) 1992 Microsoft Corporation
// All rights reserved.
//
// This source code is only intended as a supplement to the
// Microsoft Foundation Classes Reference and Microsoft
// QuickHelp and/or WinHelp documentation provided with the library.
// See these sources for detailed information regarding the
// Microsoft Foundation Classes product.
#include "stdafx.h"
#include "magmaed.hpp"
#include "mainfrm.h"
#include "multipad.h"
CMultiPadApp NEAR theApp;
BEGIN_MESSAGE_MAP(CMultiPadApp, CWinApp)
//{{AFX_MSG_MAP(CMultiPadApp)
ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
//}}AFX_MSG_MAP
ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew) // file commands...
ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
ON_COMMAND(ID_FILE_PRINT_SETUP, CWinApp::OnFilePrintSetup)
END_MESSAGE_MAP()
BOOL CMultiPadApp::InitInstance()
{
SetDialogBkColor();
LoadStdProfileSettings();
AddDocTemplate(new CMultiDocTemplate(IDR_TEXTTYPE,
RUNTIME_CLASS(CPadDoc), RUNTIME_CLASS(CMDIChildWnd),
RUNTIME_CLASS(CMagmaEditView)));
m_pMainWnd = new CMainFrame;
((CFrameWnd*)m_pMainWnd)->LoadFrame(IDR_MAINFRAME);
m_pMainWnd->ShowWindow(m_nCmdShow);
// enable file manager drag/drop and DDE Execute open
m_pMainWnd->DragAcceptFiles();
EnableShellOpen();
RegisterShellFileTypes();
if (m_lpCmdLine[0] == 0)
OnFileNew();
else
OpenDocumentFile(m_lpCmdLine);
return TRUE;
}
void CMultiPadApp::OnAppAbout()
{
CDialog(IDD_ABOUTBOX).DoModal();
}
/////////////////////////////////////////////////////////////////////////////